package com.renshuai.demo.mybatis.entity;

import javax.annotation.PostConstruct;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.BeanNameAware;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * <p>
 * 
 * </p>
 *
 * @author renshuai
 * @since 2020-04-02
 */
@Configuration
public class Order implements BeanNameAware, InitializingBean, BeanFactoryAware{
	
	
	public Order() {
		super();
		System.out.println("无参构造");
	}
	private void initMethod() {
		System.out.println("initMethod");
	}
	
	@PostConstruct
	private void init() {
		System.out.println("@PostConstruct");

	}
	
    private static final long serialVersionUID=1L;

    private Integer id;

    private String userId;

    private String commodityCode;

    private Integer count;

    private Integer money;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getCommodityCode() {
        return commodityCode;
    }

    public void setCommodityCode(String commodityCode) {
        this.commodityCode = commodityCode;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Integer getMoney() {
        return money;
    }

    public void setMoney(Integer money) {
        this.money = money;
    }

    @Override
    public String toString() {
        return "Order{" +
        "id=" + id +
        ", userId=" + userId +
        ", commodityCode=" + commodityCode +
        ", count=" + count +
        ", money=" + money +
        "}";
    }

	public void setBeanName(String name) {
		System.out.println("setBeanName");
		
	}

	public void afterPropertiesSet() throws Exception {
		System.out.println("afterPropertiesSet");
		
	}
	public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
		System.out.println("setBeanFactory");
		
	}
}
